<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var promise = new Promise((resolve,reject)=>{
        setTimeout((flag)=>{
            if(flag){
                console.log("第一次请求成功")
                resolve()
            }else{
                console.log("第一次请求失败")
                reject()
            }
        },1000,true)
    })

    promise.then(()=>{
        throw new Error("周冬雨太美")
        return new Promise((resolve,reject)=>{
            setTimeout((flag)=>{
                if(flag){
                    console.log("第二次请求成功")
                    resolve()
                }else{
                    console.log("第二次请求失败")
                    reject()
                }
            },1000,true)
        })
    }).then(()=>{
        setTimeout((flag)=>{
            if(flag){
                console.log("第三次请求成功")
            }else{
                console.log("第三次请求失败")
            }
        },1000,true)
    },()=>{
        console.log("----")
    })
</script>
</html>